﻿using System;
using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    [ServiceContract(Namespace = "http://HRMService")]
    public interface ILeaveRecord
    {
        [OperationContract]
        DataSet LeaveRecord_GetAll();

        [OperationContract]
        DataSet LeaveRecord_GetList(out int ItemCount, int currentPage, int pageSize);

        [OperationContract]
        bool LeaveRecord_CheckExist(int EmployeeID, int month, int year);

        [OperationContract]
        LeaveRecordInfo LeaveRecord_GetInfo(int LRID);

        [OperationContract]
        DataSet LeaveRecord_GetOne(int LRID);

        [OperationContract]
        int LeaveRecord_Insert(LeaveRecordInfo _lRInfo);

        [OperationContract]
        bool LeaveRecord_Update(LeaveRecordInfo _lRInfo);

        [OperationContract]
        bool LeaveRecord_Delete(int LRID);

        [OperationContract]
        DataSet LeaveRecord_GetWithEmployee(int EmployeeID);

    }

    [DataContract(Namespace = "http://HRMService")]
    public class LeaveRecordInfo
    {

        private int _ID;
        [DataMember]
        public int ID
        {
            get
            {
                return _ID;
            }
            set
            {
                _ID = value;
            }
        }
        private int _EmployeeID;
        [DataMember]
        public int EmployeeID
        {
            get
            {
                return _EmployeeID;
            }
            set
            {
                _EmployeeID = value;
            }
        }
        private DateTime _FromDate;
        [DataMember]
        public DateTime FromDate
        {
            get
            {
                return _FromDate;
            }
            set
            {
                _FromDate = value;
            }
        }
        private DateTime _ToDate;
        [DataMember]
        public DateTime ToDate
        {
            get
            {
                return _ToDate;
            }
            set
            {
                _ToDate = value;
            }
        }
        private decimal _ALDays;
        [DataMember]
        public decimal ALDays
        {
            get
            {
                return _ALDays;
            }
            set
            {
                _ALDays = value;
            }
        }
        private decimal _CODays;
        [DataMember]
        public decimal CODays
        {
            get
            {
                return _CODays;
            }
            set
            {
                _CODays = value;
            }
        }
        private decimal _ALBefore;
        [DataMember]
        public decimal ALBefore
        {
            get
            {
                return _ALBefore;
            }
            set
            {
                _ALBefore = value;
            }
        }
        private decimal _COBefore;
        [DataMember]
        public decimal COBefore
        {
            get
            {
                return _COBefore;
            }
            set
            {
                _COBefore = value;
            }
        }

    }
}

